//
//  CombinationViewController.m
//  CherryPlumStore
//
//  Created by SDX on 2019/10/7.
//  Copyright © 2019 千凯. All rights reserved.
//

#import "CombinationViewController.h"

@interface CombinationViewController ()

@end

@implementation CombinationViewController
-(instancetype) init {
    self = [super init];
    if (self) {
        self.view.backgroundColor = [UIColor whiteColor];
    }
    return self;
}
-(void) viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    [self addNav];
}


-(void)addNav {
    UINavigationBar *navBar = [[UINavigationBar alloc]initWithFrame:CGRectMake(0, STATUSBARHEIGHT, SCREENWIDTH, 44)];
    
    navBar.barTintColor = [UIColor redColor];
    navBar.tintColor = [UIColor whiteColor];
        
    UINavigationItem *navItem = [[UINavigationItem alloc]initWithTitle:@"组合"];
    UIBarButtonItem *backBtn = [[UIBarButtonItem alloc]initWithTitle:@"返回" style:UIBarButtonItemStylePlain target:self action:@selector(back)];
    // 设置标题的样式
    [navBar setTitleTextAttributes:@{
        NSFontAttributeName: [UIFont systemFontOfSize:19],
        NSForegroundColorAttributeName: [UIColor whiteColor]
    }];
    navItem.leftBarButtonItem = backBtn;
    [navBar setItems:@[navItem]];
    
    [self.view addSubview:navBar];
}

-(void)back {
    [self.navigationController popViewControllerAnimated:YES];
}
@end
